package com.weichuang.service.impl;

import com.weichuang.dao.UserDao;
import com.weichuang.service.UserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserServiceImpl implements UserService {
    private UserDao userDao1;

    public UserServiceImpl(UserDao userDao) {
        this.userDao1 = userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao1 = userDao;
    }

    @Override
    public void save() {
        /*ClassPathXmlApplicationContext applicationContext
                = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserDao userDao = (UserDao) applicationContext.getBean("userDao");*/
        userDao1.save();
    }
}
